package com.example.pojo;

import lombok.Data;

@Data
public class Result {

    private Boolean success;
    private String message;
    private Object data;

    public static Result success(Object data){
        Result result = new Result();
        result.success = true;
        result.message="登录成功!";
        result.data = data;
        return result;
    }
    public static Result success(String message){
        Result result = new Result();
        result.success = true;
        result.message=message;
        return result;
    }

    public static Result fail() {
        Result result = new Result();
        result.success = false;
        result.message="登录失败,请检查用户名或密码!";
        return result;
    }
    public static Result fail(String message) {
        Result result = new Result();
        result.success = false;
        result.message=message;
        return result;
    }
}
